
function checkIP(sIPAddress) {
	var exp=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/; 
	var reg = sIPAddress.match(exp);
	if (reg == null) {
		return false;
	}
	return true;
}
function checkNetIP(sIPAddress) {
	if (sIPAddress == "0.0.0.0")
		return true;
	var exp=/^([1-9][0-9]{0,1}|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9][0-9]{0,1}|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9][0-9]{0,1}|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9][0-9]{0,1}|1\d\d|2[0-4]\d|25[0-5])$/;
	var reg = sIPAddress.match(exp);
	if (reg == null) {
		return false;
	}
	return true;
}
function checkMask(sIPAddress) {
	if (sIPAddress == "0.0.0.0")
		return true;
	var exp=/^([1-9][0-9]{0,1}|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9][0-9]{0,1}|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9][0-9]{0,1}|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9][0-9]{0,1}|1\d\d|2[0-4]\d|25[0-5])$/;
	var reg = sIPAddress.match(exp);
	if (reg == null) {
		return false;
	}
	return true;
}
function CheckPort(str) {
	if ( (IsNumeric(str) != true) || (str > 65535) || (str < 0 ))
		return false;
	return true;
}
function CheckProtoCode(str) {
	if (IsNumeric(str)!=true || (str>255 || str<0))
		return false;
	return true;
}
